<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}" media="all"/>
</head>
<body>
<div class="layui-container site-content">
    <blockquote class="layui-elem-quote layui-text" style="margin-top: 20px;">
        fast-mybatis 代码自动生成工具 V1.0 版
    </blockquote>

    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend>数据库连接</legend>
    </fieldset>

    <form class="layui-form" id="myform" lay-filter="db" method="post" action="/testConn">
        <div class="layui-form-item">
            <label class="layui-form-label">数据库地址</label>
            <div class="layui-input-inline">
                <input type="text" id="url" name="url" lay-verify="url" autocomplete="off" placeholder="请输入数据库地址"
                       class="layui-input">
            </div>

            <label class="layui-form-label">数据库端口</label>
            <div class="layui-input-inline">
                <input type="text" id="port" name="port" lay-verify="required" placeholder="请输入" autocomplete="off"
                       class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">帐号</label>
                <div class="layui-input-inline">
                    <input type="tel" id="username" name="username" lay-verify="required" autocomplete="off"
                           class="layui-input">
                </div>

                <label class="layui-form-label">密码</label>
                <div class="layui-input-inline">
                    <input type="password" id="password" name="password" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">数据库</label>
                <div class="layui-input-block">
                    <select id="sel-db" name="sel-db" lay-filter="sel-db" lay-verify="required">
                    </select>
                </div>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <a class="layui-btn" id="demo1" lay-filter="demo1">连接</a>
                <a class="layui-btn" id="closedb" lay-filter="closedb">释放数据库链接</a>
            </div>
        </div>
        <input type="hidden" id="hid_db_name" name="dbName" value=""/>
        <input type="hidden" id="hid_table_name" name="tableName"/>
        <input type="hidden" id="hid_key_word" name="keyWord"/>
    </form>

    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend id="link-msg"></legend>
    </fieldset>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">搜索</label>
            <div class="layui-input-inline">
                <input type="text" id="search_table_name" name="search_table_name" lay-verify="required"
                       autocomplete="off" class="layui-input">
            </div>
        </div>
        <table id="table-demo" lay-filter="table-demo"></table>
        <script type="text/html" id="barDemo">
            <a class="layui-btn layui-btn-sm" lay-event="edit"><i class="layui-icon layui-icon-download-circle"></i> 生成</a>
        </script>
    </div>

    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend>生成文件信息</legend>
    </fieldset>
    <form class="layui-form" lay-filter="xm" id="xm">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">项目包路径</label>
                <div class="layui-input-inline">
                    <input type="text" name="rootPath" lay-verify="required" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">Service路径</label>
                <div class="layui-input-inline">
                    <input type="text" name="servicePath" lay-verify="required" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">Dao路径</label>
                <div class="layui-input-inline">
                    <input type="text" name="daoPath" lay-verify="required" autocomplete="off" class="layui-input">
                </div>
            </div>

        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">Mapper路径</label>
                <div class="layui-input-inline">
                    <input type="text" name="mapperPath" lay-verify="required" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">实体类路径</label>
                <div class="layui-input-inline">
                    <input type="text" name="entityPath" lay-verify="required" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">Controller路径</label>
                <div class="layui-input-inline">
                    <input type="text" name="webPath" lay-verify="required" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">作者</label>
                <div class="layui-input-inline">
                    <input type="text" name="author" lay-verify="required" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
    </form>
    <br>

    <button class="layui-btn layui-btn-lg" id="gen">生成选中</button>
</div>
<script th:src="@{/layui/layui.js}" charset="utf-8"></script>
<script th:src="@{/js/index.js}" charset="utf-8"></script>


</body>
</html>